﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DatabaseLib;

namespace DatabaseProgram
{
    class Program
    {
        static void Main(string[] args)
        {
            var dr = new DatabaseRep(@"Data Source=AERIAl-LT\SQLEXPRESS; Initial Catalog=Test;"
                                                     + "Integrated Security=true");

        //    Student st = dr.GetOne(2);
      //      Console.WriteLine(st.Id+" "+st.Name);
        
          //  dr.Update(new Student(2, "Loh"));
      //dr.RemoveStud(1);
        dr.AddStud(new Student(1, "hui"));    
            foreach (Student student in dr.GetAll())
            {
                Console.WriteLine(student.Id+ " " + student.Name);
            }
            Console.ReadLine();
        }
    }
}
